﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebApplication10.App_Code;

namespace WebApplication10
{
    public partial class MasterEmployeeRegister : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            JobSeeker js = new JobSeeker();
            js.Username = UserName.Text;
            js.Password = Password.Text;
            js.NameOfSeeker = Name.Text;
            js.Contact = Convert.ToInt32(Contact.Text);
            js.Email = Email.Text;
            js.Address = Address.Text;
            js.PostalCode = Convert.ToInt32(PostalCode.Text);
            js.Gender = Convert.ToChar(txtGender.Text);
            js.DayOfBirth = Convert.ToInt32(txtDate.Text);
            js.MonthOfBirth = Convert.ToInt32(txtMonth.Text);
            js.YearOfBirth = Convert.ToInt32(txtYear.Text);
            int newJobSeekerID = JobSeeker.InsertJobSeeker(js);
            JobSeeker.InsertJobSeeker(js);
            Response.Redirect("~/SuccessfulRegistration.aspx");
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/HomePage.aspx");

        }
    }
}